package common.core.util;

/**
 * 自定义异常
 * @author liubo
 *
 */
public class CustomizeRuntimeException extends RuntimeException{
	
	private static final long serialVersionUID = 1L;
	
	private Object data;

    public CustomizeRuntimeException() {
        super();
    }
    
    public static CustomizeRuntimeException exception(Throwable cause,String message){
    	return new CustomizeRuntimeException(message,cause);
    }
    public static CustomizeRuntimeException exception(String message,Object data){
    	return new CustomizeRuntimeException(message, data);
    }

    public static CustomizeRuntimeException exception(String message){
    	return new CustomizeRuntimeException(message);
    }

    public CustomizeRuntimeException(String message) {
        super(message);
    }
    public CustomizeRuntimeException(String message,Object data) {
        super(message);
        this.data = data;
    }

    public CustomizeRuntimeException(String message, Throwable cause) {
        super(message, cause);
    }

    public CustomizeRuntimeException(Throwable cause) {
        super(cause);
    }

    protected CustomizeRuntimeException(String message, Throwable cause,
                               boolean enableSuppression,
                               boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
    
	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

}
